<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--
  Created by IntelliJ IDEA.
  User: xh
  Date: 2020/2/13
  Time: 14:55
  To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>积分记录 - 技术栈 - Java程序员成长平台</title>
    <meta name="keywords" content="">
    <meta name="description" content>
    <link rel="stylesheet" href="${APP_PATH}/vendor/layui-v2.4.5/layui/css/layui.css">
    <link rel="stylesheet" href="${APP_PATH}/css/common.css">
    <link rel="stylesheet" href="${APP_PATH}/css/header.css">
    <link rel="stylesheet" href="${APP_PATH}/css/footer.css">
    <link rel="stylesheet" href="${APP_PATH}/css/score-record.css">
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<jsp:include page="head.jsp"></jsp:include>

<div class="layui-main g-main">
    <div class="layui-row">
        <div class="layui-col-xs12">
            <blockquote class="layui-elem-quote">
                总积分：<span class="layui-badge-rim badge-number">${requestScope.ScoreCount}分</span>，
            </blockquote>
            <table class="layui-table" lay-skin="line">
                <thead>
                <tr>
                    <th>积分类型</th>
                    <th>积分原因</th>
                    <th>积分值</th>
                    <th>创建时间</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${requestScope.page.datas}" var="score" varStatus="status">
                <tr>
                    <td>${score.type}</td>
                    <td>${score.reason}</td>
                    <td>${score.worth}</td>
                    <td>${score.getTime}</td>
                </tr>
                </c:forEach>
                </tbody>
            </table>
            <div class="page">

                <div id="layui-laypage" class="layui-box layui-laypage layui-laypage-default">
                    <c:if test="${requestScope.page.pageNo > 1}">
                        <a class="layui-laypage-prev" href="${APP_PATH}/score/toIndex?pageNo=${requestScope.page.pageNo - 1}&userId=${sessionScope.user.id}" data-page="1">上一页</a>
                    </c:if>
                    <c:if test="${requestScope.page.pageNo <= 1}">
                        <a class="layui-laypage-prev layui-disabled" href="#" data-page="0">上一页</a>
                    </c:if>

                    <c:forEach begin="1" end="${requestScope.page.pageTotal}" var="i" step="1">
                        <c:if test="${i == requestScope.page.pageNo}">
                <span class="layui-laypage-curr">
            <em class="layui-laypage-em"></em>
            <em>${i}</em>
             </span>
                        </c:if>
                        <c:if test="${i != requestScope.page.pageNo}">
                            <a href="${APP_PATH}/score/toIndex?pageNo=${i}&userId=${sessionScope.user.id}" data-page="${i}">${i}</a>
                        </c:if>
                    </c:forEach>

                    <c:if test="${requestScope.page.pageNo < requestScope.page.pageTotal}">
                        <a class="layui-laypage-next" href="${APP_PATH}/score/toIndex?pageNo=${requestScope.page.pageNo + 1}&userId=${sessionScope.user.id}" >下一页</a>
                    </c:if>
                    <c:if test="${requestScope.page.pageNo >= requestScope.page.pageTotal}">
                        <a class="layui-laypage-next layui-disabled" href="#" >下一页</a>
                    </c:if>
                </div>

            </div>
        </div>
    </div>
</div>

<div class="g-footer layui-clear">
    <hr>
    <div>Copyright ©2018 技术栈(jishuzhan.club), All Rights Reserved.</div>
    <div>渝ICP备13001123号-2</div>
</div>

<script src="${APP_PATH}/vendor/holder.min.js"></script>
<script src="${APP_PATH}/vendor/layui-v2.4.5/layui/layui.js"></script>
<script src="${APP_PATH}/js/common.js"></script>
<%--<script src="${APP_PATH}/js/score-record.js"></script>--%>
</body>
</html>
